﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Entities;
using System.Security.Permissions;
namespace WCF_ListenMusic.Services.Module_Album.Admin
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IManageAlbumService" in both code and config file together.
    [ServiceContract]
    public interface IManageAlbumService
    {
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        List<AlbumSinger> getAllAlbum();

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        int countSonginAlbum(int albumid);

        [OperationContract]       
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        int getMax_AlbumID();

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        bool insertNewAlbum(Album a);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        bool uploadAlbumSong(Album_Song albumSong);

        [OperationContract]       
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        int getMaxID_AlbumSong();

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        AlbumSinger getAlbum_byID(int albumid);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        bool updateAlbum(Album album);

        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFAdmin")]
        bool deleteSonginAlbum(int songid);
    }
}
